class Cube {

	static belongsTo = [place:Place, type:CubeType]
	
	int x // width
	
	int y // height
	
	int z // 0 = ground
	
	Unit unit // can have only one unit per case
	
	static constraints = {
		x()
		y()
		z()
		unit(nullable:true,unique:true)
	}
	
	String coords() { "$x.$y.$z" }
	
	String toString() { "$x.$y.$z" }
	
}